import request from '@/utils/request.js'
import apis from '@/utils/api'
/**
 * @param {Object} params
 * 商品
 */
export function addGoods(params) {
    return request.globalRequest(apis.addGoods, 'POST', params)
}

export function delGoods(params) {
    return request.globalRequest(apis.delGoods, 'POST', params)
}

export function updateGoods(params) {
    return request.globalRequest(apis.updateGoods, 'POST', params)
}

export function getGoodsList(params) {
    return request.globalRequest(apis.getGoodsList, 'POST', params)
}
export function groupByType(params) {
    return request.globalRequest(apis.groupByType, 'POST', params)
}
export function getAllGoodsList(params) {
    return request.globalRequest(apis.getAllGoodsList, 'POST', params)
}
export function getGoodsListFront(params) {
    return request.globalRequest(apis.getGoodsListFront, 'POST', params)
}
export function getGoodsById(params) {
    return request.globalRequest(apis.getGoodsById, 'POST', params)
}
export function searchGoods(params) {
    return request.globalRequest(apis.searchGoods, 'POST', params)
}
export function pushToIndex(params) {
    return request.globalRequest(apis.pushToIndex, 'POST', params)
}
export function changeOrder(params) {
    return request.globalRequest(apis.changeOrder, 'POST', params)
}
export function getGoodsBySku(params) {
    return request.globalRequest(apis.getGoodsBySku, 'POST', params)
}


export default {
	addGoods,
	delGoods,
	updateGoods,
	getGoodsList,
	getAllGoodsList,
	getGoodsListFront,
	getGoodsById,
	searchGoods,
	groupByType,
	changeOrder,
	pushToIndex,
	getGoodsBySku
}